// home相关路由
// 显示页

const router = require("express").Router();

router.get("/home",(req,res)=>{
    // res.send("我是home页")
    let arr = ['猪八戒',"沙和尚","玉兔精","蜘蛛精"];
    let sign = "";
    let content = `
        <div>
            <h2 style='color:red'>我是一个标签</h2>
        </div>
    `;
    res.render("home",{
        arr,
        sign,
        content
    })
})
// post
router.post("/home",(req,res)=>{
    res.send("我是home页post请求")
})

module.exports = router